#[macro_use]
extern crate serde_derive;
extern crate serde;
extern crate serde_json;

#[derive(Debug, Serialize, Deserialize)]
pub struct Runtime {
    pub cid: String,
    pub workdir: String,
    pub rootfs: String,
    pub pid: String,
    pub pid_file: String,
    pub config: String,
}

impl Runtime {
    pub fn new(cid: &str, workdir: &str, rootfs: &str) -> Result<Runtime, Error> {
        Rustime::mkdir(cid);
        Ok(Runtime {
            cid: cid.to_string(),
            workdir: workdir.to_string(),
            rootfs: rootfs.to_string(),
            pid: String::new(),
            pid_file: String::new(),
            config: String::new(),
        })
    }
}
